package model

import "time"

type Restaurant struct {
	Id int64 `xorm:"pk autoincr"`
	Name string
	DiscountPackageList []*DiscountPackage `xorm:"-"`
	DishesTypeList []*DishesType `xorm:"-"`
	EvaluateList []*Evaluate `xorm:"-"`
	CreatedAt time.Time
	UpdatedAt time.Time
}

type DiscountPackage struct {
	Id int64 `xorm:"pk autoincr"`
	RestaurantId int64
	RestaurantName string
	UserId int64
	UserName string
	Amount int
	CreatedAt time.Time
	UpdatedAt time.Time
}

type DishesType struct {
	Id int64 `xorm:"pk autoincr"`
	Name string
	DishesVarietyList []*DishesVariety `xorm:"-"`
	CreatedAt time.Time
	UpdatedAt time.Time
}

type DishesVariety struct {
	Id int64 `xorm:"pk autoincr"`
	DishesTypeId int64
	RestaurantId int64
	RestaurantName string
	Name string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Evaluate struct {
	Id int64 `xorm:"pk autoincr"`
	RestaurantId int64
	RestaurantName string
	UserId int64
	UserName string
	Content string
	CreatedAt time.Time
	UpdatedAt time.Time
}